package com.aidex.biz.utils.hengchang;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
public class Base64Util {
    /**
     * base64编码
     */
    public static String encryptBASE(byte[] data) throws Exception {
        return new BASE64Encoder().encodeBuffer(data);
    }

    /**
     * 行base64解码
     */
    public static byte[] decryptBASE(String ciphertext) throws Exception {
        return new BASE64Decoder().decodeBuffer(ciphertext);
    }
}
